1. Field of the Invention
The present invention relates to a technique for enabling quick connection to a device providing a desired service.
2. Related Background Art
Conventionally, when performing Bluetooth wireless communication between devices, a device on a side initiating the communication detects another device in its proximity, and inquires a class (CoD: Class of Device) of the other device which was detected. If the inquired class is a class for providing a desired service, a connection is made to the other device, and then it is confirmed whether the desired service is actually provided. Then, if the provision of the desired service was confirmed, a request to use the desired service is sent to the other device, and the desired service is used.
FIG. 8 is a flowchart showing specific operations using the service offered at the connection destination, according to conventional Bluetooth wireless communication.
First, at step S1, in order that a main device detects another Bluetooth device in the proximity, the Bluetooth wireless communication is used to issue an inquiry request. The other Bluetooth device which received the inquiry request sends an inquiry response containing the other device's properties (i.e., its class). Therefore, by receiving the inquiry response, the device(s) present in the proximity can be detected.
At step S2, it is determined whether or not the inquiry response to the inquiry request issued at step S1 was received. In the case where the inquiry response was received, then at step S3, a Bluetooth Device Address (BD_ADDR) enabling unique identification of the Bluetooth device, and the Class of Device (CoD) indicating the class of the Bluetooth device, which are included in the inquiry response, are extracted, and a table containing those information is prepared.
At step S4, it is determined whether or not a predetermined time-out period has elapsed. In a case where it has not elapsed, the processing at step S2 and step S3 is repeated.
In a case where the time-out period has elapsed at step S4, then at step S5, the CoD in a top row of the table prepared at step S3 is obtained, and at step S6, it is determined whether or not the CoD thus obtained is related to the class desired by the main device. In a case where it is not the desired class, then at step S7, it is determined whether or not the end of the table has been reached. If the end has not been reached, then the point referenced on the table advances to the next row, and the procedure returns to the processing at step S5.
At step S6, in a case where it is judged that the CoD is related to the desired class, then at step S8, the BD_ADDR existing in the same line as the CoD on the table is obtained, and a connection is made to the Bluetooth device indicated by the BD_ADDR.
At step S9, the Service Discovery Protocol (SDP) is used, and a service record search command is issued to the connected device. The other device which received the service record search command determines whether or not the other device has the designated service record. If the other device has the designated service record, the service record is returned to the device which issued the service record search command.
At step S10, it is determined whether or not the designated service record was returned. If the designated service record was not returned, then the procedure advances to step S7. At step S10, in a case where the designated service record was returned, then at step S11, the service is used according to information indicated in the service record.
As described above, the conventional Bluetooth device detects the proximate other devices, and can focus on the other device which can provide the desired service from among the detected other devices based on their CoDs. However, in order to confirm whether the above-mentioned other device actually provides the service, it is necessary to actually connect to the other device. Further, in a case where the result of the confirmation indicates that the desired service is not actually provided, it is necessary to reconnect to another device and make another confirmation.
Therefore, until another device which has the desired service is found, it is necessary to connect to a plurality of other devices, obtain the service contents provided by those other devices, and confirm them.
For example, in a case where one wants to make the other device print a document, a connection is made to another device having a CoD indicating a printer. However, printing services exist in many varieties. Thus, printers exist which, depending on the printer, provide only an image printing service and cannot do text printing, or provide single-sided printing but cannot do double-sided printing.
In other words, according to the above-mentioned conventional example, in the case where the Bluetooth wireless communication is used to receive the desired service, there is a problem in that the main device cannot be connected accurately and quickly to the other device which actually provides the desired service.